home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / 3DTOSHI2.ZIP / mpgfx / include / gfxpal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-12  |  861 b   |  38 lines

  1.  
  2. // gfxpal.h
  3. //
  4. // Copyright (c) 1995 by Toshiaki Tsuji, all rights reserved.
  5.  
  6. #ifndef __GFXPALETTE_H__
  7. #define __GFXPALETTE_H__
  8.  
  9. #include "stdgfx.h"
  10. #include "gfxobj.h"
  11.  
  12. #define COLOR  LONG
  13.  
  14. class RGBPALETTE : public MYOBJECT
  15.   {
  16.     protected :
  17.       RGBCOLOR Entry[256];
  18.       double GetColorDistance ( RGBCOLOR Col1, LONG Index );
  19.  
  20.     public :
  21.       RGBPALETTE ();
  22.       virtual ~RGBPALETTE ();
  23.  
  24.       RGBCOLOR* GetEntry () { return Entry; };
  25.       LONG GetClosestColor ( RGBCOLOR Color );
  26.       VOID SetColorScale ( RGBCOLOR Color, INT Start, INT End,
  27.                            float StartInt, float EndInt );
  28.  
  29.       COLOR GetRGB ( BYTE R, BYTE G, BYTE B );
  30.       COLOR GetIndex ( LONG Index );
  31.  
  32.       VOID SetWindowsPalette ();
  33.       
  34.       BOOLEAN IsIdentical ( RGBPALETTE *Pal );
  35.   }; // End of RGBPALETTE
  36.  
  37. #endif
  38.